package com.example.document

import com.example.document.entity.DocEntity
import com.example.lib_base.BaseRepository
import com.example.lib_http.HttpType
import com.example.lib_http.NetWorkFactory
import kotlinx.coroutines.flow.Flow

class DocRepository:BaseRepository() {

    fun selDocuments(map:Map<String,Any>):Flow<DocEntity>{
        val documents = NetWorkFactory.factory(HttpType.NONE)
            .create(ApiService::class.java)
            .selDocuments(createBody(map))

        return documents
    }

    fun delDocuments(map:Map<String,Any>):Flow<DocEntity>{
        val flow = NetWorkFactory.factory(HttpType.NONE)
            .create(ApiService::class.java)
            .delDocuments(createBody(map))
        return flow
    }
}